using System;
using UnityEngine;
using UnityEngine.UI;

namespace Script.UI.Panel
{
    public class ManagerWnd : MonoBehaviour
    {
        public Button exitBtn;
        public Button mainWndBtn;
        public Button fullViewBtn;

        public void Awake()
        {
            exitBtn.onClick.AddListener(OnClickExitBtn);
            mainWndBtn.onClick.AddListener(() =>
            {
                UI_MainWnd.Ins.SetCurrentLocation(10);
            });
            
            fullViewBtn.onClick.AddListener(() =>
            {
                UI_MainWnd.Ins.SetCurrentLocation(1);
            });
        }

        public void OnClickExitBtn()
        {

#if UNITY_EDITOR
            UnityEditor.EditorApplication.isPlaying = false;
#else
            Application.Quit();
#endif

        }
    }
}